import time
from cases.登录 import login
from BeautifulReport import BeautifulReport
import unittest
from cases.住院医生站.住院医生站 import kemuch_zhuyuanyishengzhan_kaijuchufangyiji, kemuch_zhuyuanyishengzhan_tingchangqiyizhu
from cases.住院护士站.住院护士站 import  kemuch_zhuyuanhushizhan_anpaichuangwei, \
    kemuch_zhuyuanhushizhan_yijizhixing, kemuch_zhuyuanhushizhan_chuyuanzunbei, kemuch_zhuyuanhushizhan_chuyuan
from cases.住院管理.住院登记 import kemuch_zhuyuandengji
from cases.初始化设置 import kemuch_chushihuashezhi
from cases.医技管理.医技执行 import kemuch_quxiaoyijizhixing
from cases.手术管理.手术申请 import kemuch_shoushushenqing
from cases.手术管理.麻醉申请 import kemuch_mazuishenqing
from cases.收费管理.划价收费 import kemuch_huajiashoufei
from cases.收费管理.退款处理 import kemuch_tuikuanchuli
from cases.药房管理.住院手术退药 import kemuch_zhuyuanshoushutuiyao
from cases.药房管理.住院药房发药 import kemuch_zhuyuanyaofangfayao
from cases.药房管理.住院药房手术发药 import kemuch_zhuyuanyaofangshoushufayao
from cases.药房管理.住院药房退药 import kemuch_zhuyuanyaofangtuiyao
from cases.药房管理.处方发药 import kemuch_chufangfayao
from cases.药房管理.处方退药 import kemuch_chufangtuiyao
from cases.门诊医生站.门诊医生站 import kemuch_menzhenyishengzhan
from cases.门诊医生站.门诊退方 import kemuch_menzhentuifang
from cases.门诊护士站.门诊护士站 import kemuch_menzhenhushizhan
from cases.门诊挂号.服务登记 import kemuch_fuwudengji

#登录
suite1 = unittest.TestSuite()
loader1 = unittest.TestLoader()
suite1.addTest(loader1.loadTestsFromTestCase(login.TestLogin))
#初始化
suite2 = unittest.TestSuite()
loader2 = unittest.TestLoader()
suite2.addTest(loader2.loadTestsFromTestCase(kemuch_chushihuashezhi.TestChushihua))
#门诊主流程
suite3 = unittest.TestSuite()
loader3 = unittest.TestLoader()
suite3.addTest(loader3.loadTestsFromTestCase(kemuch_fuwudengji.TestFuwudengji))
suite3.addTest(loader3.loadTestsFromTestCase(kemuch_menzhenyishengzhan.TestMenzhenyishengzhan))
suite3.addTest(loader3.loadTestsFromTestCase(kemuch_huajiashoufei.TestHuajiashoufei))
suite3.addTest(loader3.loadTestsFromTestCase(kemuch_chufangfayao.TestChufangfayao))
suite3.addTest(loader3.loadTestsFromTestCase(kemuch_menzhenhushizhan.TestMenzhenhushizhan))
#门诊退费
suite4 = unittest.TestSuite()
loader4 = unittest.TestLoader()
suite4.addTest(loader4.loadTestsFromTestCase(kemuch_menzhentuifang.Testtuifang))
suite4.addTest(loader4.loadTestsFromTestCase(kemuch_chufangtuiyao.TestChufangtuiyao))
suite4.addTest(loader4.loadTestsFromTestCase(kemuch_quxiaoyijizhixing.TestQuxiaoyijizhixing))
suite4.addTest(loader4.loadTestsFromTestCase(kemuch_tuikuanchuli.TestTuikuanchuli))

#住院主流程
suite5 = unittest.TestSuite()
loader5 = unittest.TestLoader()
suite5.addTest(loader5.loadTestsFromTestCase(kemuch_zhuyuandengji.TestZhuyuandengji))
suite5.addTest(loader5.loadTestsFromTestCase(kemuch_zhuyuanhushizhan_anpaichuangwei.TestZhuyuanhushizhan_Anpaichuangwei))
suite5.addTest(loader5.loadTestsFromTestCase(kemuch_zhuyuanyishengzhan_kaijuchufangyiji.TestZhuyuanyishengzhan_kaijuchufangyiji))
suite5.addTest(loader5.loadTestsFromTestCase(kemuch_zhuyuanhushizhan_yijizhixing.TestZhuyuanhushizhan_Yijizhixing))
suite5.addTest(loader5.loadTestsFromTestCase(kemuch_shoushushenqing.TestShoushushenqing))
suite5.addTest(loader5.loadTestsFromTestCase(kemuch_mazuishenqing.TestMazuishenqing))
suite5.addTest(loader5.loadTestsFromTestCase(kemuch_zhuyuanyaofangfayao.TestZhuyuanyaofangfayao))
suite5.addTest(loader5.loadTestsFromTestCase(kemuch_zhuyuanyaofangshoushufayao.TestZhuyuanyaofangshoushufayao))
suite5.addTest(loader5.loadTestsFromTestCase(kemuch_zhuyuanhushizhan_chuyuanzunbei.TestZhuyuanhushizhan_Chuyuanzunbei))
suite5.addTest(loader5.loadTestsFromTestCase(kemuch_zhuyuanshoushutuiyao.TestZhuyuanshoushutuiyao))
suite5.addTest(loader5.loadTestsFromTestCase(kemuch_zhuyuanyaofangtuiyao.TestZhuyuanyaofangtuiyao))
suite5.addTest(loader5.loadTestsFromTestCase(kemuch_zhuyuanyishengzhan_tingchangqiyizhu.TestZhuyuanyishengzhan_Tingchangqiyizhu))
suite5.addTest(loader5.loadTestsFromTestCase(kemuch_zhuyuanhushizhan_chuyuan.TestZhuyuanhushizhan_Chuyuan))




now = time.strftime("%Y%m%d%H%M%S")
report_name = "kemuch_{}.html".format(now)
runner = BeautifulReport(suite5)
#执行用例
runner.report(description="测试报告", filename = report_name, report_dir=r"../report")